<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>base.Overlay</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="base-module.html">Module&nbsp;base</a> ::
        Class&nbsp;Overlay
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="base.Overlay-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Overlay</h1><span class="codelink"><a href="base-pysrc.html#Overlay">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
          object --+    
                   |    
pygame.sprite.Sprite --+
                       |
                      <strong class="uidshort">Overlay</strong>
</pre>

<hr />
Overlay can be used to display auxiliary animated effects over a 
  sprite. Overlays are not independent game objects. Overlays do not 
  contain any graphics resources on their own. Overlays do not collide. 
  Overlay's image size is changed dynamically. Overlay's image has to be 
  initialized with owner's image in order to preserve surface properites. 
  Overlay itself should be added to group 'draw' immediatelly after its 
  owner is added to that groups in order to display properly (not to 
  display over other objects).<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="base.Overlay-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*groups</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="base-pysrc.html#Overlay.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="init_image"></a><span class="summary-sig-name">init_image</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">owner_image</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="base-pysrc.html#Overlay.init_image">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="has_image"></a><span class="summary-sig-name">has_image</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="base-pysrc.html#Overlay.has_image">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="base.Overlay-class.html#fill" class="summary-sig-name">fill</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">colour</span>,
        <span class="summary-sig-arg">rect</span>=<span class="summary-sig-default">None</span>)</span><br />
      Fill overlay fragment with <code>colour</code>.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="base-pysrc.html#Overlay.fill">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="base.Overlay-class.html#clear" class="summary-sig-name">clear</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">rect</span>=<span class="summary-sig-default">None</span>)</span><br />
      Clear overlay fragment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="base-pysrc.html#Overlay.clear">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="base.Overlay-class.html#blit" class="summary-sig-name">blit</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">image</span>,
        <span class="summary-sig-arg">dest</span>,
        <span class="summary-sig-arg">area</span>)</span><br />
      Blit <code>image</code> on overlay.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="base-pysrc.html#Overlay.blit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="base.Overlay-class.html#resize" class="summary-sig-name">resize</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dest</span>)</span><br />
      If needed resize overlay to fit <code>dest</code>.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="base-pysrc.html#Overlay.resize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="base.Overlay-class.html#align" class="summary-sig-name">align</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">pos</span>,
        <span class="summary-sig-arg">align</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">center</code><code class="variable-quote">'</code></span>)</span><br />
      Position overlay.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="base-pysrc.html#Overlay.align">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>pygame.sprite.Sprite</code></b>:
      <code>__repr__</code>,
      <code>add</code>,
      <code>add_internal</code>,
      <code>alive</code>,
      <code>groups</code>,
      <code>kill</code>,
      <code>remove</code>,
      <code>remove_internal</code>,
      <code>update</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*groups</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="base-pysrc.html#Overlay.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  
  <dl class="fields">
    <dt>Overrides:
      pygame.sprite.Sprite.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="fill"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">fill</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">colour</span>,
        <span class="sig-arg">rect</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="base-pysrc.html#Overlay.fill">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Fill overlay fragment with <code>colour</code>.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>colour</code></strong> (sequence) - Fill colour</li>
        <li><strong class="pname"><code>rect</code></strong> (<code><a href="base.AGRect-class.html" 
          class="link">AGRect</a></code> or <code>None</code>) - Area to be filled. Size and coordinates of top-left corner of 
          area relative to overlay center. If <code>None</code> entire 
          overlay area is filled.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="clear"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">clear</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">rect</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="base-pysrc.html#Overlay.clear">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Clear overlay fragment.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>rect</code></strong> (<code><a href="base.AGRect-class.html" 
          class="link">AGRect</a></code> or <code>None</code>) - Area to be cleared. Size and coordinates of top-left corner of
          area relative to overlay center. If <code>None</code> entire 
          overlay area is cleared.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="blit"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">blit</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">image</span>,
        <span class="sig-arg">dest</span>,
        <span class="sig-arg">area</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="base-pysrc.html#Overlay.blit">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Blit <code>image</code> on overlay.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>image</code></strong> (<code>pygame.Surface</code>) - Image to blit</li>
        <li><strong class="pname"><code>dest</code></strong> (sequence) - Position of top-left corner of image relative to overlay 
          center.</li>
        <li><strong class="pname"><code>area</code></strong> (<code><a href="base.AGRect-class.html" 
          class="link">AGRect</a></code>) - Image fragment to be blit.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="resize"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">resize</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dest</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="base-pysrc.html#Overlay.resize">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>If needed resize overlay to fit <code>dest</code>.</p>
  Warning. Overlay content is not preserved (yet) which may cause 
  filcker or other negative effects.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>dest</code></strong> (sequence) - Area needed for new blit.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="align"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">align</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">pos</span>,
        <span class="sig-arg">align</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">center</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="base-pysrc.html#Overlay.align">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Position overlay.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>pos</code></strong> (sequence) - Position in global coordinate system.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Jul 31 17:03:02 2008
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
